<template>
	<view class="content" v-if="info.order_sn">
		 <view>
		
		<view class="cu-form-group">
				<view class="title light">服务内容</view>
				<view class="picker">
						{{info.title}}
				</view>
				
			</view>
			
		
			<view class="cu-form-group">
				<view class="title light">订单号</view>
				<view class="picker">
						{{info.order_sn}}
				</view>
				
			</view>
			
			<view class="cu-form-group" >
				<view class="title light">报价</view>
				<view class="picker">
						¥ {{info.order_amount}}
				</view>
			</view>
			<view class="cu-form-group" >
			<view class="grid flex-sub padding-lr col-1" >
				    <view style="text-align: center; padding-top: 20px;">扫码完成支付</view>
					<image style="width: 100%;" mode="widthFix"  :src="show_qrcode_url"></image>
			</view>
			</view>

		 </view>
		  
		  
		 
		  
	     
	</view>
</template>
<style>
	.cu-form-group .title{ max-width: 160upx;min-width: 160upx;}
</style>
<script>
	import beeApp from '../../beeApp.js'
	
	export default {
		data() {
			return {
				 
				info:{
					data:{
						
					}
				},
				user_info:{
					
				},
				show_qrcode_url:'',
				id:0,
				loadding:0,
				loadding1:0,
			}
		},
		onLoad(option) {
			this.order_sn = option.order_sn;
			var url = beeApp.data.apiHost+"/apiv2/pay/fastpay?order_sn="+this.order_sn
			this.show_qrcode_url= beeApp.data.apiHost+"/api/index/urlQRcode?url="+encodeURIComponent(url);
		    this.getinfo();
		 
		},
		
		onShow:function(){
			var reload = beeApp.getPageData("pages/order/detail","reload");
			if(reload==1){
				beeApp.setPageData("pages/order/detail",{reload:0});
				this.getinfo();
			}
		},
		
		onPullDownRefresh() {
			this.getinfo();
			uni.stopPullDownRefresh();
		},
		methods: {
			
			   getinfo:function(){
                    var that = this;
                    beeApp.api("apiv2/order/find",{
                        order_sn:this.order_sn,
                    },function(res){
                         if(res.code!=200){
							beeApp.alert(res.msg);
                            return;
                         }
						 if ( res.data.data){
							  res.data.data = JSON.parse( res.data.data)
						 }
						 that.info = res.data; 
						  
                    });
                },
				
	}
		
}
</script>
